package com.manager;

import com.google.android.maps.MapActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ContactManagerActivity extends MapActivity implements OnClickListener {	
			
	public Button myaddcontactBtn;
	public Button mycontactlistBtn;
	
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        myaddcontactBtn = (Button) findViewById(R.id.buttonAddContact);
        myaddcontactBtn.setOnClickListener(this);
        mycontactlistBtn = (Button) findViewById(R.id.buttonContactList);
        mycontactlistBtn.setOnClickListener(this);
    }
    
    @Override
    public void onClick(View arg0)
    {
    	switch(arg0.getId())
    	{
    	case R.id.buttonAddContact:    		
    		launchAddContact();
    	break;
    	case R.id.buttonContactList:    		
    		launchContactList();
    	break;
    	}
    }
    
    private void launchAddContact()
    {
    	final Intent displayview = new Intent(ContactManagerActivity.this, AddContactManagerActivity.class);
    	startActivity(displayview);
    	finish();
    }
    
    private void launchContactList()
    {
    	final Intent displayview = new Intent(ContactManagerActivity.this, ContactListActivity.class);
    	startActivity(displayview);
    	finish();
    }

	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}
                
}